﻿using Framework;
using Game.Model;
using UnityEngine;
using UnityEngine.UI;

namespace Game.View
{
    /// <summary>
    /// 标题场景视图
    /// </summary>
    public class TitleView : MonoBehaviour, SceneManager.ISceneView
    {
        public Text _TitleText;

        private void Awake()
        {
            _TitleText.text = "XPSRPG-Project";
        }

        public void OnMenuButtonClicked(Button button)
        {
            switch (button.GetComponentInChildren<Text>().name)
            {
                case "NewGame":
                {
                    var modelManager = ModelManager.Instance;
                    modelManager.Initialize();
                    // TODO: 进入游戏状态
                } break;
                case "Continue":
                {
                } break;
                case "Exit":
                {
                } break;
            }
        }
    }
}